package test.pcs;

import com.payment.lc.pcs.client.wrap.bo.ProductionTimeAttributes;
import com.payment.lc.pcs.client.wrap.bo.ProductionValueAttributes;
import com.payment.lc.pcs.client.wrap.model.ZiGuanTime;
import com.payment.lc.pcs.client.wrap.service.ProductionWrapService;
import com.payment.lc.pcs.service.api.DynamicDataService;
import com.payment.lc.pcs.service.api.ProductionService;
import com.payment.lc.pcs.service.domain.Production;
import com.xiaomi.finance.lc.wx.api.WechatBenefitPushService;
import com.xiaomi.finance.lc.wx.api.WechatService;
import com.xiaomi.finance.lc.wx.api.model.TplDataValue;
import com.xiaomi.finance.lc.wx.api.model.WechatResp;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import test.BaseTest;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;

/**
 * Created on 2016/8/8.
 */
public class Demo2PcsTestWechat extends BaseTest {
    private SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
    private SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");


    @Autowired
    WechatBenefitPushService wechatBenefitPushService;

    @Autowired
    WechatService wechatService;

    @Test
    public void test() {
        test1();
    }

    void test3() {
        wechatBenefitPushService.pushBenefit();
    }

    void test1() {
        String toMid = "123456";
        String url = "";
        String tid = "k5ziYNTHAca14rwn4X_MVs7GcktawxALO8P8meq69Rw";
        ArrayList<TplDataValue> tplDataValues = new ArrayList<>();
        tplDataValues.add(new TplDataValue("name", "xxxxxxxxxxxx", ""));
        WechatResp wechatResp = wechatService.sendTemplateMsg(toMid, tid, url, tplDataValues);
        display(wechatResp);
    }
}